1. Field of the Invention
The present invention relates to a vector encoding technique.
2. Description of the Related Art
Vectorization is a technology that achieves the reuse of scanned images in systems such as copying machines and multifunction peripherals. Application examples of vectorization are disclosed in Japanese Patent Laid-Open Nos. 2004-246577 and 2004-265384. To increase the efficiency of reuse, demands have arisen for vectorization of images from which scan noise is removed.
On the other hand, noise removal sometimes removes necessary data, e.g., fine dots such as halftone dots. Thus, original scanned images are necessary to print out high-quality images.
On the basis of the prior art explained above, the present applicant has developed a hierarchical encoding using a vectorization process, such as is explained hereinafter.
FIG. 11 is a block diagram showing the functional configuration of a controller of an image processing apparatus, e.g., a copying machine or multifunction peripheral. FIG. 12 is a flowchart of processing performed by the controller of the image processing apparatus. The operation of each unit shown in FIG. 11 will be explained hereinafter, with reference to FIG. 12.
A determination unit 1104 receives output image data from a scanning unit, and segments the input image into a plurality of rectangles, i.e., rectangular images. FIG. 12 is a flowchart of processing performed on each segmented rectangle. Although processing of a target rectangle will be explained hereinafter, other rectangles are also similarly processed.
In step S1201, the determination unit 1104 determines whether the target rectangle is a character/line image, or a natural image. If the target rectangle contains both a character/line image and a natural image, the determination unit 1104 determines that the target rectangle is a natural image.
If the determination unit 1104 determines that the target rectangle is a natural image, the process advances to step S1202, wherein a bitmap compressor 1106 compresses the target rectangle in accordance with the JPEG international standard. In step S1203, the bitmap compressor 1106 stores the compressed target rectangle on a hard drive 1107.
In step S1204, a bitmap decompressor 1113 reads out the stored compressed target rectangle from the hard drive 1107, and decompresses the readout rectangle in synchronism with the timing of printing performed by a printing engine, i.e., a printer. The decompressing process corresponds to the foregoing compressing process.
In step S1205, an image processor 1112 performs a variety of types of image processing on the decompressed target rectangle. In step S1206, the image processor 1112 outputs the processed target rectangle to the printing engine.
On the other hand, if the determination unit 1104 determines in step S1201 that the target rectangle is a character/line image, the process advances to step S1207, wherein the determination unit 1104 transmits a copy of the image of the target rectangle to a difference image generator 1110. In step S1208, the determination unit 1104 transmits the original target rectangle to a PDL-like image generator 1105.
The PDL-like image generator 1105 removes noise from the received target rectangle. The reason is that an image received from a scanner typically contains scan noise, and the encoding amount increases if this noise is vectorized.
Subsequently, in step S1209, a vector processor 1108 vectorizes the image from which the noise is removed by the PDL-like image generator 1105, i.e., the image is converted into vector data. In step S1210, the vector processor 1108 stores the result of this vectorization process on the hard drive 1107. The vector processor 1108 has an arrangement shown in FIG. 13.
FIG. 13 is a block diagram showing the arrangement of the vector processor 1108. As shown in FIG. 13, the vector processor 1108 has a labeling unit 1301 and vectorizing unit 1302.
As shown in FIG. 14, the labeling unit 1301 extracts objects, e.g., characters, gradation regions, and the background, from the target rectangle by using the well-known labeling technique. The vectorizing unit 1302 vectorizes the objects extracted by the labeling unit 1301, and stores the resulting vectorized data on the hard drive 1107.
Following is a brief description of the processing performed by the labeling unit 1301. The labeling unit 1301 scans pixels of each line forming the target rectangle, regards almost equal pixel values as a uniform color, and stores, in a table, the start position (Xstart), end position (Xend), and color information of a section regarded as having a uniform color. For example, if pixels having monochrome values are arranged in the order of (130, 130, 129, 129, 131, 131, 130, 130, 130, 129) in positions (x, y)=(0, 0) to (0, 9), the labeling unit 1301 stores information Xstart=(0, 0), Xend=(0, 9), level=130 in the table for the section.
Subsequently, when completely performing the processing on all lines in the target rectangle, the labeling unit 1301 generates a uniform-color region by connecting uniform-color sections that contact each other across the lines. The labeling unit 1301 regards the uniform-color region as an object, and notifies the vectorizing unit 1302 of information of coordinates forming the contour of each object.
In step S1211 of FIG. 12, the vectorized data stored on the hard drive 1107 in step S1210 is copied, and the copied vectorized data is output to a vector renderer 1109. The vector renderer 1109 restores the image in the target rectangle on the basis of the received vectorized data. The target rectangle restored from the vector data is called a vector restored image. The vector renderer 1109 sends the vector restored image to the difference image generator 1110.
In step S1212, the difference image generator 1110 receives the original target rectangle from the determination unit 1104, and generates a difference image by calculating a difference between the image of the original target rectangle and the vector restored image. Pixels forming the difference image have difference pixel values between the pixels corresponding to the original target rectangle and the pixels corresponding to the vector restored image.
In step S1213, the bitmap compressor 1106 compresses the difference image. In step S1214, the bitmap compressor 1106 stores the compressed difference image in the hard drive 1107.
In step S1215, the vector renderer 1109 generates a vector restored image on the basis of the vectorized data that is stored on the hard drive 1107 in step S1210, and sends the image to a synthesizer 1111. In addition, the bitmap decompressor 1113 decompresses the compressed difference image that is stored on the hard drive 1107 in step S1214, and sends the decompressed image to the synthesizer 1111, which synthesizes the difference image decompressed by the bitmap decompressor 1113 and the vector restored image restored by the vector renderer 1109.
The vector restored image is an image that is restored on the basis of the vector data generated from the image obtained by removing noise from the target rectangle. Accordingly, necessary information, e.g., halftone dots, is sometimes removed by the noise removal. This makes the vector restored image inadequate as a printout image in some cases. When using the vector data in printing, therefore, the synthesizer 1111 synthesizes the vector restored image and the difference image to form a printout bitmap, which it sends to the image processor 1112.
In step S1205, the image processor 1112 performs various types of image processing on the printout bitmap. In step S1206, the image processor 1112 outputs the processed printout bitmap to the printing engine.
As per the foregoing, the processing performed by the labeling unit 1301 generally comprises determining a uniform-color region, storing information of the region, and identifying an object. The operations increase the processing load, and sometimes lower the processing speed required of the whole system. Accordingly, establishing a system that increases the speed of the vectorization process is a significant concern.